home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Technology Seed / ADC Seed CD - July 1999.toast / USB / Mac OS USB DDK v1.2 / Examples / USBSampleStorageDriver / StorageClassSample Changes < prev    next >
Encoding:
Text File  |  1999-04-15  |  7.6 KB  |  99 lines  |  [TEXT/MPS ]

  1. Changes to the 1.2 USBSampleStorageDriver sources:
  2. Class Driver Changes:
  3. - Added correct information to the Interface info in the drive descriptor in SampleStorageHeader.c.  
  4.  
  5. - Set the kDoNotMatchGeneric flag in the Driver Loading flags in SampleStorageHeader.c.
  6.  
  7. - Changed all locations where the Class Driver was returning kNotConfigured as an error.  kNotConfigured is
  8.     defined as equalled to zero and when returned would make the caller think that it was returning noErr.
  9.     Added a kClassNoConfiguredErr which is now returned if the class is not configured.
  10.     
  11. UnitTable Driver Changes:
  12. - Removed BlockZero and internal parameter block initialization from the DriverStatusCmd routine.
  13.  
  14. - Added a check for specific control calls that actually need to use the internal parameter block
  15.     before doing a BlockZero and initializing the parameter block in the DriverControlCmd routine.
  16.  
  17.  
  18. Changes to the 1.1f1 USBSampleStorageDriver sources:
  19. - Renamed USBShim.exp to StorageClassShim.exp, to clarify that this file belongs to the shim.
  20.  
  21. - Renamed DriverIcons.c to StorageClassUTDriverIcons.c, to clarify that this file belongs to the Unit Table driver.
  22.  
  23. - Renamed DriverIcons.h to StorageClassUTDriverIcons.h, to clarify that this file belongs to the Unit Table driver.
  24.  
  25. - Removed all unused structures and definitions for BlockDriverPriv.h, and moved the remaining ones into StorageClassUTFunctions.c where they are actually used
  26.  
  27. - Replaced all the Shuttle specific values from the SampleStorageDeviceID.h header file with descriptions of what belong in each of those fields.  These descriptions will have to be replaced with actual values before the projects can be built.
  28.  
  29. - Updated the Information block at the begining of each file in all the projects to reflect the correct name of the file, correct contents of the file, updated all the versions to 1.1, and made sure all files had the copyright information.
  30.  
  31. - Updated both Make files. The driver can now also be built with MPW.  The built pieces end up in the Targets folder. ( Maybe an Extensions - MPW Built folder should be added. There still are crazy people like me that use MPW.)
  32.  
  33. Class Driver Changes:
  34. - Removed the kGetFullConfiguration0 and kGetFullConfiguration1 states and replaced them with kGetFullConfiguration state.  The 0 and 1 version were left over from devices that may have their default configuration as either one of two interfaces.  In the Mass Storage Driver case, it is always the same, therefore I removed the unused state.
  35.  
  36. - Removed the following states that were not being used:
  37.     kStorageInitiateBulkWrite
  38.     kStorageBulkWriteComplete
  39.     kStorageInitiateBulkRead
  40.     kStorageReadFirmwareVersion
  41.  
  42. - Removed StorageBlockRWPB structures and changed all cast to type StorageExecuteCommandPBPtr, which is actually what is being passed in from the Unit Table Driver.
  43.  
  44. - Added a fix to solve a problem where if an error occurred on the control portion of a request that had data to transfer, the class driver would still issue the Bulk Request which the device would NAK indefinitely.  This could keep the device from being accessable.
  45.  
  46. - Added code to limit any single Bulk Request to 2MB or less.  If the class driver gets a request for more than 2MB, it will issue multiple Bulk Requests of 2MB or less until all the data is transferred.
  47.  
  48. - Removed fields from the Storage Class internal Parameter Blocks that were never used.
  49.  
  50. - Removed constant definitions that were never used.
  51.  
  52. - Removed Function Prototypes for non-existant functions
  53.  
  54. Storage Driver Shim Changes:
  55. - Grouped function in the Shim by purpose ( i.e. all USB Manger functions together, all internal functions together.)
  56.  
  57. - Changed -1 in the install notification routine to use the defined wildcard constant for each field from USB.h
  58.  
  59. - Changed the Set DispatchTable Control call to the Unit Table from PBControlAsync to Control.  This cleans up the code by removing the completion routine and the polling loop for the completion.  Since we know that the Shim is at Task time, and the Unit Table Driver doesn't make any other calls and returns back immediately, there is no problem with making this call synchronously.
  60.  
  61. - Added the USBRemoveNotification to the USBShimTermination routine. This will remove our notification proc if the Shim is ever removed.  (We're being a good citizen.)
  62.  
  63. -Changed GetResource calls to Get1Resource.  If the driver doesn't exist in our resource fork, we don't want the Resource Manager trying to get it from someone else's.
  64.  
  65. - If an error occurs while trying to get the dispatch table pointer, or while trying to call the Unit Table driver's Set Dispatch Table control call, the shim will remove the driver from the Unit Table.  This will keep unsuable Unit Table Drivers from sticking around.
  66.  
  67. Unit Table Driver Changes:
  68. - Removed the addOneToAddDrive global.  I replaced all AddDrive calls to a call to a new function NativeAddDrive which will handle making the call to AddDrive with the correct parameters.  This means only one function that has to care about this fix.
  69.  
  70. - Changed the name of OurParamBlock to UTDriverGlobals since it isn't really a Parameter block.  The new name makes it easier to understand what the purpose of the structure really is.
  71.  
  72. - Removed all Drive Setup and Apple Diagnostic tool Control and Status calls.  SInce these are calls that are only supported by drivers that Apple ships with Drive Setup, they do not do anything useful for third party developers.
  73.  
  74. - Removed a lot of code that was left over from an attempt to handle if someone forcibly removes a cartridge by using a paper clip in the emergency eject pinhole.  Since this code didn't do anything useful, and was quite ugly looking, it is now gone.
  75.  
  76. - Removed the CheckUnexpectedRemoval function and the busState field from the DriveRec structure.  These are leftover from the ATA driver.  CheckUnexpectedRemoval actually was calling PostEvent while the driver was trying to remove the drive from the drive queue.  It doesn't appear to have cause any problems, but it isn't a good thing to be doing.  ( This was also causing confusion in third party developers.)
  77.  
  78. - In the drivers Close routine, I added a check to verify that the Storage Class Dispatch table is valid before calling into it.  This seems to be the only place that the dispatch table was used without verifying it first.  This isn't causing any problems, but could if the Unit Table driver was ever loaded, and the dispatch table couldn't be set, the driver will crash when the driver is removed.  ( Saw this happen with some early builds of the USB 1.1 software.)
  79.  
  80. - The drive calls DriverGestaltOff in its close routine, if the driver is closed, it isn't supposed to accept Control/Status calls. ( Again, the driver is being a good citizen.)
  81.  
  82. - If the driver doesn't accept a control or status call, I made sure it was returning the appropriate controlErr/statusErr error.
  83.  
  84. - Changed all references to PCX to read as PC Exchange.
  85.  
  86. - Removed all flush drive cache code.  This is device dependent, and the driver was always returning false to the kdgFlush driver gestalt anyways.
  87.  
  88. - Removed all drive power control code.  Again, this is device dependent, and the driver was always returning false to the driver gestalts anyways.
  89.  
  90. - Removed some leftover code from the FormatFlopptCartridge function.
  91.  
  92. - Fixed CreateVolume function to return the correct DrvSts type if a floppy disk is inserted.
  93.  
  94. - Added more accurate comments to the InstallVolumes function to explain what the function is doing, and to inform developers that this would be where partition scanning support code would be added.
  95.  
  96. - Renamed the MountUnmountVolumes function as MountVolumes.  All the function has ever done is mount volumes.  It has never had unmount support.
  97.  
  98.  
  99.